//教职工今日考勤
var myChart1 = echarts.init(document.getElementById('echartTea'));
option = {
    title: {
        text: '教职工今日考勤'
    },
    tooltip: {
        trigger: 'item',
        formatter: "{a} <br/>{b}: {c} ({d}%)"
    },
    legend: {
        orient: 'vertical',
        x: 'right',
        data:['准时','迟到','缺勤','请假']
    },
    color:['#F0AD4E','#337AB7','#5CB85C','#5BC0DE'],
    series: [

        {
            name:'访问来源',
            type:'pie',
            radius: ['50%', '70%'],
            label: {
                normal: {
                    formatter: '{b|{b}：{c}}',
                    backgroundColor: '#eee',
                    borderColor: '#aaa',
                    borderWidth: 1,
                    borderRadius: 4,

                    rich: {
                        b: {
                            fontSize: 16,
                            lineHeight: 33
                        },
                        per: {
                            color: '#eee',
                            backgroundColor: '#334455',
                            padding: [2, 4],
                            borderRadius: 2
                        }
                    }
                }
            },
            data:[
                {value:1, name:'迟到'},
                {value:50, name:'准时'},
                {value:1, name:'缺勤'},
                {value:3, name:'请假'},
            ]
        }
    ]
};
//学生今日考勤
myChart1.setOption(option);
var myChart2 = echarts.init(document.getElementById('echartStu'));
option = {
    title: {
        text: '学生今日考勤'
    },
    tooltip: {
        trigger: 'item',
        formatter: "{a} <br/>{b}: {c} ({d}%)"
    },
    legend: {
        orient: 'vertical',
        x: 'right',
        data:['准时','迟到','缺勤','请假']
    },
    color:['#F0AD4E','#337AB7','#5CB85C','#5BC0DE'],
    series: [

        {
            name:'访问来源',
            type:'pie',
            radius: ['50%', '70%'],
            label: {
                normal: {
                    formatter: '{b|{b}：{c}}',
                    backgroundColor: '#eee',
                    borderColor: '#aaa',
                    borderWidth: 1,
                    borderRadius: 4,

                    rich: {


                        b: {
                            fontSize: 16,
                            lineHeight: 33
                        },
                        per: {
                            color: '#eee',
                            backgroundColor: '#334455',
                            padding: [2, 4],
                            borderRadius: 2
                        }
                    }
                }
            },
            data:[
                {value:1, name:'迟到'},
                {value:50, name:'准时'},
                {value:1, name:'缺勤'},
                {value:3, name:'请假'},
            ]
        }
    ]
};
myChart2.setOption(option);
//教职工周考勤
(function tea(){
    var dom = document.getElementById("echartTeaM");
    var myChart3 = echarts.init(dom);
    var app = {};
    option = null;
    var posList = [
        'left', 'right', 'top', 'bottom',
        'inside',
        'insideTop', 'insideLeft', 'insideRight', 'insideBottom',
        'insideTopLeft', 'insideTopRight', 'insideBottomLeft', 'insideBottomRight'
    ];
    app.configParameters = {
        rotate: {
            min: -90,
            max: 90
        },
        align: {
            options: {
                left: 'left',
                center: 'center',
                right: 'right'
            }
        },
        verticalAlign: {
            options: {
                top: 'top',
                middle: 'middle',
                bottom: 'bottom'
            }
        },
        position: {
            options: echarts.util.reduce(posList, function (map, pos) {
                map[pos] = pos;
                return map;
            }, {})
        },
        distance: {
            min: 0,
            max: 100
        }
    };
    app.config = {
        rotate: 90,
        align: 'left',
        verticalAlign: 'middle',
        position: 'insideBottom',
        distance: 15,
        onChange: function () {
            var labelOption = {
                normal: {
                    rotate: app.config.rotate,
                    align: app.config.align,
                    verticalAlign: app.config.verticalAlign,
                    position: app.config.position,
                    distance: app.config.distance
                }
            };
            myChart.setOption({
                series: [{
                    label: labelOption
                }, {
                    label: labelOption
                }, {
                    label: labelOption
                }, {
                    label: labelOption
                }]
            });
        }
    };
    var labelOption = {
        normal: {
            show: true,
            position: app.config.position,
            distance: app.config.distance,
            align: app.config.align,
            verticalAlign: app.config.verticalAlign,
            rotate: app.config.rotate,
            formatter: '{c}',
            fontSize: 16,
            rich: {
                name: {
                    textBorderColor: '#fff'
                }
            }
        }
    };

    option = {
        title: {
            text: '教职工周考勤'
        },
        color: ['#337AB7','#F0AD4E','#5CB85C','#5BC0DE'],
        tooltip: {
            trigger: 'axis',
            axisPointer: {
                type: 'shadow'
            }
        },
        legend: {
            data: ['准时','迟到','缺勤','请假']
        },
        toolbox: {
            show: true,
            orient: 'vertical',
            left: 'right',
            top: 'center',
            feature: {
                mark: {show: true},
                dataView: {show: true, readOnly: false},
                magicType: {show: true, type: ['line', 'bar', 'stack', 'tiled']},
                restore: {show: true},
                saveAsImage: {show: true}
            }
        },
        calculable: true,
        xAxis: [
            {
                type: 'category',
                axisTick: {show: false},
                data: ['星期一', '星期二', '星期三', '星期四', '星期五','星期六','星期天']
            }
        ],
        yAxis: [
            {
                type: 'value'
            }
        ],
        series: [
            {
                name: '准时',
                type: 'bar',
                barGap: 0,
                label: labelOption,
                data: [320, 332, 301, 334, 390,100,200]
            },
            {
                name: '迟到',
                type: 'bar',
                label: labelOption,
                data: [220, 182, 191, 234, 290,200,30]
            },
            {
                name: '缺勤',
                type: 'bar',
                label: labelOption,
                data: [150, 232, 201, 154, 190,300,300]
            },
            {
                name: '请假',
                type: 'bar',
                label: labelOption,
                data: [98, 77, 101, 99, 40,400,300]
            }
        ]
    };;
    if (option && typeof option === "object") {
        myChart3.setOption(option, true);
    }
}());
// 学生周考勤
(function stu() {
    var dom = document.getElementById("echartStuM");
    var myChart4 = echarts.init(dom);
    var app = {};
    option = null;
    var posList = [
        'left', 'right', 'top', 'bottom',
        'inside',
        'insideTop', 'insideLeft', 'insideRight', 'insideBottom',
        'insideTopLeft', 'insideTopRight', 'insideBottomLeft', 'insideBottomRight'
    ];
    app.configParameters = {
        rotate: {
            min: -90,
            max: 90
        },
        align: {
            options: {
                left: 'left',
                center: 'center',
                right: 'right'
            }
        },
        verticalAlign: {
            options: {
                top: 'top',
                middle: 'middle',
                bottom: 'bottom'
            }
        },
        position: {
            options: echarts.util.reduce(posList, function (map, pos) {
                map[pos] = pos;
                return map;
            }, {})
        },
        distance: {
            min: 0,
            max: 100
        }
    };
    app.config = {
        rotate: 90,
        align: 'left',
        verticalAlign: 'middle',
        position: 'insideBottom',
        distance: 15,
        onChange: function () {
            var labelOption = {
                normal: {
                    rotate: app.config.rotate,
                    align: app.config.align,
                    verticalAlign: app.config.verticalAlign,
                    position: app.config.position,
                    distance: app.config.distance
                }
            };
            myChart.setOption({
                series: [{
                    label: labelOption
                }, {
                    label: labelOption
                }, {
                    label: labelOption
                }, {
                    label: labelOption
                }]
            });
        }
    };
    var labelOption = {
        normal: {
            show: true,
            position: app.config.position,
            distance: app.config.distance,
            align: app.config.align,
            verticalAlign: app.config.verticalAlign,
            rotate: app.config.rotate,
            formatter: '{c}',
            fontSize: 16,
            rich: {
                name: {
                    textBorderColor: '#fff'
                }
            }
        }
    };

    option = {
        title: {
            text: '学生周考勤'
        },
        color: ['#337AB7','#F0AD4E','#5CB85C','#5BC0DE'],
        tooltip: {
            trigger: 'axis',
            axisPointer: {
                type: 'shadow'
            }
        },
        legend: {
            data: ['准时', '迟到', '请假', '缺勤']
        },
        toolbox: {
            show: true,
            orient: 'vertical',
            left: 'right',
            top: 'center',
            feature: {
                mark: {show: true},
                dataView: {show: true, readOnly: false},
                magicType: {show: true, type: ['line', 'bar', 'stack', 'tiled']},
                restore: {show: true},
                saveAsImage: {show: true}
            }
        },
        calculable: true,
        xAxis: [
            {
                type: 'category',
                axisTick: {show: false},
                data: ['星期一', '星期二', '星期三', '星期四', '星期五','星期六','星期天']
            }
        ],
        yAxis: [
            {
                type: 'value'
            }
        ],
        series: [
            {
                name: '准时',
                type: 'bar',
                barGap: 0,
                label: labelOption,
                data: [320, 332, 301, 334, 390,100,200]
            },
            {
                name: '迟到',
                type: 'bar',
                label: labelOption,
                data: [220, 182, 191, 234, 290,200,30]
            },
            {
                name: '请假',
                type: 'bar',
                label: labelOption,
                data: [150, 232, 201, 154, 190,300,300]
            },
            {
                name: '缺勤',
                type: 'bar',
                label: labelOption,
                data: [98, 77, 101, 99, 40,400,300]
            }
        ]
    };;
    if (option && typeof option === "object") {
        myChart4.setOption(option, true);
    }
})();
// 获取教职工数据
//根据数据创建教职工表
(function () {
    var itemMax = 6;
//当前页面
    var nowPage = 1;
    var firstItem = itemMax * (nowPage - 1);
    var lastItem = itemMax * (nowPage);
    // var getArr = JSON.parse(localStorage.getItem('departmentJson'));
    var getArr=JSON.parse(localStorage.getItem('staff'));
    $.each(getArr, function(index, value) {
        if (index >= firstItem && index < lastItem) {
            createList($('.table1'), index, value);
        }
    })

//创建分页
    createPage();

    function createPage() {
        // var read = JSON.parse(localStorage.getItem('departmentJson'));
        var read=JSON.parse(localStorage.getItem('staff'));
        $('#teaNav').append('<li><a href="javascript:;" id="leftPage"><span style="font-size: 14px;">&laquo;</span></a></li>');
        for (var i = 0; i < Math.ceil(read.length / itemMax); i++) {

            $('#teaNav').append('<li><a href="javascript:;" class="pageNum" id="' + (i + 1) + '">' + (i + 1) + '</a></li>');

        }
        $('#teaNav').append('<li><a href="javascript:;" id="rightPage"><span style="font-size: 14px;">&raquo;</span></a></li>');

    }
//渲染函数
    function createList(obj, index, value) {
        $('.table1').append('<tr>\n' +
            '<td>'+value.Jn+'</td>\n' +
            '<td>'+value.name+'</td>\n' +
            '<td>'+value.department+'</td>\n' +
            // '<td>\n' +
            // '<button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#teaWeek">\n' +
            // '考勤周报\n' +
            // '</button>\n' +
            // '</td>\n' +
            '<td>\n' +
            '<button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#teaMonth">\n' +
            '考勤月报\n' +
            '</button>\n' +
            '</td>\n' +
            '</tr>');
    }
    $('#teaNav').children().eq(1).addClass('active');
    $('#teaNav').children().eq(1).addClass('act');
//为分页添加事件
    $('#teaNav').on('click', 'a', function() {
        if ($(this).attr('id') == 'leftPage') {
            if ($('.pageNum[id=' + nowPage + ']').parent().prev().children().eq(0).attr('id') != 'leftPage') {
                $(this).parent().removeClass('disabled');
                nowPage -= 1;
                $('.act').removeClass('active');
                $('.act').removeClass('act');
                $('#teaNav').children().eq(nowPage).addClass('active');
                $('#teaNav').children().eq(nowPage).addClass('act');
                //$("tr:not('.headline')").remove();
                $('.table1').children().not('.headline').remove();
                firstItem = itemMax * (nowPage - 1);
                lastItem = itemMax * (nowPage);
                //var read = JSON.parse(localStorage.getItem('departmentJson'));
                var read=JSON.parse(localStorage.getItem('staff'));
                $.each(read, function(index, value) {
                    if (index >= firstItem && index < lastItem) {
                        createList($('.table1'), index, value);
                    }
                })
            }else{
                $(this).parent().addClass('disabled','disabled');
            }
        } else if ($(this).attr('id') == 'rightPage') {
            if ($('.pageNum[id=' + nowPage + ']').parent().next().children().eq(0).attr('id') != 'rightPage') {
                $(this).parent().removeClass('disabled');
                nowPage += 1;
                $('.act').removeClass('active');
                $('.act').removeClass('act');
                $('#teaNav').children().eq(nowPage).addClass('active');
                $('#teaNav').children().eq(nowPage).addClass('act');
                // $("tr:not('.headline')").remove();
                $('.table1').children().not('.headline').remove();
                firstItem = itemMax * (nowPage - 1);
                lastItem = itemMax * (nowPage);
                //var read = JSON.parse(localStorage.getItem('departmentJson'));
                var read=JSON.parse(localStorage.getItem('staff'));
                $.each(read, function(index, value) {
                    if (index >= firstItem && index < lastItem) {
                        createList($('.table1'), index, value);
                    }
                })
            }else{
                $(this).parent().addClass('disabled','disabled');
            }
        } else {

            //$("tr:not('.headline')").remove();
            $('.table1').children().not('.headline').remove();
            nowPage = parseInt($(this).attr('id'));
            firstItem = itemMax * (nowPage - 1);
            lastItem = itemMax * (nowPage);
            $('.act').removeClass('active');
            $('.act').removeClass('act');
            $('#teaNav').children().eq(nowPage).addClass('active');
            $('#teaNav').children().eq(nowPage).addClass('act');
            //var read = JSON.parse(localStorage.getItem('departmentJson'));
            var read=JSON.parse(localStorage.getItem('staff'));
            $.each(read, function(index, value) {
                if (index >= firstItem && index < lastItem) {
                    createList($('.table1'), index, value);
                }
            })
        }
    });


})();
//↓↓↓↓↓↓↓↓↓↓↓↓↓↓翻页 每一页数据条数控制
(function () {
    var itemMax = 6;
//当前页面
    var nowPage = 1;
    var firstItem = itemMax * (nowPage - 1);
    var lastItem = itemMax * (nowPage);
    var getArr=JSON.parse(localStorage.getItem('studentJson'))||[];
    $.each(getArr, function(index, value) {
        if (index >= firstItem && index < lastItem) {
            createList($('.table2'), index, value);
        }
    });

//创建分页
    createPage();

    function createPage() {
        var read=JSON.parse(localStorage.getItem('studentJson'))||[];
        $('#stuNav').append('<li><a href="javascript:;" id="leftPage"><span style="font-size: 14px;">&laquo;</span></a></li>');
        for (var i = 0; i < Math.ceil(read.length / itemMax); i++) {

            $('#stuNav').append('<li><a href="javascript:;" class="pageNum" id="' + (i + 1) + '">' + (i + 1) + '</a></li>');

        }
        $('#stuNav').append('<li><a href="javascript:;" id="rightPage"><span style="font-size: 14px;">&raquo;</span></a></li>');

    }
//渲染函数
    function createList(obj, index, value) {
        $('.table2').append('<tr>\n' +
            '<td>'+value.id+'</td>\n' +
            '<td>'+value.name+'</td>\n' +
            '<td>'+value.class+'</td>\n' +
            // '<td>\n' +
            // '<button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#stuWeek">\n' +
            // '考勤周报\n' +
            // '</button>\n' +
            // '</td>\n' +
            '<td>\n' +
            '<button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#stuMonth">\n' +
            '考勤月报\n' +
            '</button>\n' +
            '</td>\n' +
            '</tr>');
    }
    $('#stuNav').children().eq(1).addClass('active');
    $('#stuNav').children().eq(1).addClass('act1');
//为分页添加事件
    $('#stuNav').on('click', 'a', function() {
        if ($(this).attr('id') == 'leftPage') {
            if ($('.pageNum[id=' + nowPage + ']').parent().prev().children().eq(0).attr('id') != 'leftPage') {
                $(this).parent().removeClass('disabled');
                nowPage -= 1;
                $('.act1').removeClass('active');
                $('.act1').removeClass('act1');
                $('#stuNav').children().eq(nowPage).addClass('active');
                $('#stuNav').children().eq(nowPage).addClass('act1');
                //$("tr:not('.headline')").remove();
                $('.table2').children().not('.headline').remove();
                firstItem = itemMax * (nowPage - 1);
                lastItem = itemMax * (nowPage);
                //var read = JSON.parse(localStorage.getItem('departmentJson'));
                //var read=JSON.parse(localStorage.getItem('staff'));
                var read=JSON.parse(localStorage.getItem('studentJson'))||[];
                $.each(read, function(index, value) {
                    if (index >= firstItem && index < lastItem) {
                        createList($('.table2'), index, value);
                    }
                });
            }else{
                $(this).parent().addClass('disabled','disabled');
            }
        } else if ($(this).attr('id') == 'rightPage') {
            if ($('.pageNum[id=' + nowPage + ']').parent().next().children().eq(0).attr('id') != 'rightPage') {
                $(this).parent().removeClass('disabled');
                nowPage += 1;
                alert(nowPage)
                $('.act1').removeClass('active');
                $('.act1').removeClass('act1');
                $('#stuNav').children().eq(nowPage).addClass('active');
                $('#stuNav').children().eq(nowPage).addClass('act1');
                // $("tr:not('.headline')").remove();
                $('.table2').children().not('.headline').remove();
                firstItem = itemMax * (nowPage - 1);
                lastItem = itemMax * (nowPage);

                //var read = JSON.parse(localStorage.getItem('departmentJson'));
                //var read=JSON.parse(localStorage.getItem('staff'));
                var read=JSON.parse(localStorage.getItem('studentJson'))||[];
                $.each(read, function(index, value) {
                    if (index >= firstItem && index < lastItem) {
                        createList($('.table2'), index, value);
                    }
                });
            }else{
                $(this).parent().addClass('disabled','disabled');
            }
        } else {

            //$("tr:not('.headline')").remove();
            $('.table2').children().not('.headline').remove();
            nowPage = parseInt($(this).attr('id'));
            firstItem = itemMax * (nowPage - 1);
            lastItem = itemMax * (nowPage);
            $('.act1').removeClass('active');
            $('.act1').removeClass('act1');
            $('#stuNav').children().eq(nowPage).addClass('active');
            $('#stuNav').children().eq(nowPage).addClass('act1');
            //var read = JSON.parse(localStorage.getItem('departmentJson'));
           // var read=JSON.parse(localStorage.getItem('staff'));
            var read=JSON.parse(localStorage.getItem('studentJson'))||[];
            $.each(read, function(index, value) {
                if (index >= firstItem && index < lastItem) {
                    createList($('.table2'), index, value);
                }
            });
        }
    });


})();



//创建渲染函数


//根据数据创建学生表

// $.each(studentArr, function(index, value) {
//     createStuList($('stutable'), index, value);
// });
// $.each(studentArr, function(index, value) {
//     if (index >= stufirstItem && index < stulastItem) {
//         createStuList($('stutable'), index, value);
//     }
// });
//
// //根据数据创建学生工表
// function createStuList(getArr, index, value) {
//     $('.stutable').append('<tr>\n' +
//         '<td>1641310201</td>\n' +
//         '<td>'+value.name+'</td>\n' +
//         '<td>'+value.class+'</td>\n' +
//         '<td>\n' +
//         '<button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#stuWeek">\n' +
//         '考勤周报\n' +
//         '</button>\n' +
//         '</td>\n' +
//         '<td>\n' +
//         '<button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#stuMonth">\n' +
//         '考勤月报\n' +
//         '</button>\n' +
//         '</td>\n' +
//         '</tr>');
// }
//
// //创建分页
// createPage();
// function createPage() {
//     var teacherArr=JSON.parse(localStorage.getItem('staff'));
//     $('#tea').append(' <li>\n' +
//         '<a href="#" class="Previous">\n' +
//         '<span style="font-size: 14px;">&laquo;</span>\n' +
//         '</a>\n' +
//         '</li>');
//     for (var i=0; i<Math.ceil(teacherArr.length/teaitemMax);i++){
//         $('#tea').append('<li><a href="javascript:;" class="pageNum" id="' + (i + 1) + '">'+(i+1)+'</a></li>');
//     };
//     $('#tea').append(' <li>\n' +
//         '<a href="#" class="Next">\n' +
//         '<span style="font-size: 14px;">&raquo;</span>\n' +
//         '</a>\n' +
//         '</li>');
//
// };
// stuCreatePage();
// function stuCreatePage() {
//     var studentArr=JSON.parse(localStorage.getItem('studentJson'))||[];
//     $('#stu').append(' <li>\n' +
//         '<a href="#" class="Previous">\n' +
//         '<span style="font-size: 14px;">&laquo;</span>\n' +
//         '</a>\n' +
//         '</li>');
//     for (var i=0; i<Math.ceil(studentArr.length/stuitemMax);i++){
//         $('#stu').append('<li><a href="javascript:;" class="pageNum" id="' + (i + 1) + '">'+(i+1)+'</a></li>');
//     };
//     $('#stu').append(' <li>\n' +
//         '<a href="#" class="Next">\n' +
//         '<span style="font-size: 14px;">&raquo;</span>\n' +
//         '</a>\n' +
//         '</li>');
//
// };
// //为分页添加事件
// //为教师表分页添加事件
// $('#tea').on('click', 'a', function() {
//     if ($(this).attr('class') == 'Previous') {
//         if ($('.pageNum[id=' + nowPage + ']').parent().prev().children().eq(0).attr('class') != 'Previous') {
//             $(this).parent().removeClass('disabled');
//             nowPage -= 1;
//             $('.teatable').children().not('.headline').remove();
//             teafirstItem = teaitemMax * (teanowPage - 1);
//             tealastItem = teaitemMax * (teanowPage);
//             var teacherArr=JSON.parse(localStorage.getItem('staff'));
//             $.each(teacherArr, function(index, value) {
//                 if (index >= teafirstItem && index < tealastItem) {
//                     createTeaList($('teatable'), index, value);
//                 }
//             })
//         }else{
//             $(this).parent().addClass('disabled','disabled');
//         }
//     } else if ($(this).attr('class') == 'Next') {
//         if ($('.pageNum[id=' + teanowPage + ']').parent().next().children().eq(0).attr('class') != 'Next') {
//             $(this).parent().removeClass('disabled');
//             teanowPage += 1;
//             $('.teatable').children().not('.headline').remove();
//             teafirstItem = teaitemMax * (teanowPage - 1);
//             tealastItem = teaitemMax * (teanowPage);
//             var teacherArr=JSON.parse(localStorage.getItem('staff'));
//             $.each(teacherArr, function(index, value) {
//                 if (index >= teafirstItem && index < tealastItem) {
//                     createTeaList($('teatable'), index, value);
//                 }
//             })
//         }else{
//             $(this).parent().addClass('disabled','disabled');
//         }
//     } else {
//         $('.teatable').children().not('.headline').remove();
//         teanowPage = parseInt($(this).attr('id'));
//         teafirstItem = teaitemMax * (teanowPage - 1);
//         tealastItem = teaitemMax * (teanowPage);
//         var teacherArr=JSON.parse(localStorage.getItem('staff'));
//
//         $.each(teacherArr, function(index, value) {
//             if (index >= teafirstItem && index < tealastItem) {
//                 createTeaList($('teatable'), index, value);
//             }
//         })
//     }
// });
// //为学生表分页添加事件
// $('#stu').on('click', 'a', function() {
//     if ($(this).attr('class') == 'Previous') {
//         if ($('.pageNum[id=' + stunowPage + ']').parent().prev().children().eq(0).attr('class') != 'Previous') {
//             $(this).parent().removeClass('disabled');
//             stunowPage -= 1;
//             $('.stutable').children().not('.headline').remove();
//             stufirstItem = stuitemMax * (stunowPage - 1);
//             stulastItem = stuitemMax * (stunowPage);
//             var studentArr=JSON.parse(localStorage.getItem('studentJson'))||[];
//             $.each(studentArr, function(index, value) {
//                 if (index >= stufirstItem && index < stulastItem) {
//                     createStuList($('stutable'), index, value);
//                 }
//             });
//         }else{
//             $(this).parent().addClass('disabled','disabled');
//         }
//     } else if ($(this).attr('class') == 'Next') {
//         if ($('.pageNum[id=' + stunowPage + ']').parent().next().children().eq(0).attr('class') != 'Next') {
//             $(this).parent().removeClass('disabled');
//             stunowPage += 1;
//             $('.stutable').children().not('.headline').remove();
//             stufirstItem = stuitemMax * (stunowPage - 1);
//             stulastItem = stuitemMax * (stunowPage);
//             var studentArr=JSON.parse(localStorage.getItem('studentJson'))||[];
//             $.each(studentArr, function(index, value) {
//                 if (index >= stufirstItem && index < stulastItem) {
//                     createStuList($('stutable'), index, value);
//                 }
//             });
//             console.log(stunowPage)
//         }else{
//             $(this).parent().addClass('disabled','disabled');
//         }
//     } else {
//
//         $('.stutable').children().not('.headline').remove();
//         stunowPage = parseInt($(this).attr('id'));
//         stufirstItem = stuitemMax * (stunowPage - 1);
//         stulastItem = stuitemMax * (stunowPage);
//         var studentArr=JSON.parse(localStorage.getItem('studentJson'))||[];
//         $.each(studentArr, function(index, value) {
//             if (index >= stufirstItem && index < stulastItem) {
//                 createStuList($('stutable'), index, value);
//             }
//         });
//     }
// });



//教职工打卡数据
var teaCheckingIn=[

];
//学生打卡数据
var stuCheckingIn=[

];
//教职工请假数据
var teaLeave=[
    {
        StuUid:'1641310201',
        StuName: '张任',
        StuDepartmentName: '行政部',
        StuStartTime:'女',
        StuEndTime:'保卫部',
        StuApply:'1982.11.11',
        StuApprover: '李大人',
        StuLeaveNote: '不想上班',
        StuEmai:'153069749@',

    },

];
//学生请假数据
var stuLeave=[

];

